package com.hq.sso.utils;


import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;

import java.io.IOException;

/**
 * Created by WK on 2018/10/12.
 */
public class HttpUtil {

    public static String doGet4Json(String requestUrl) throws IOException {
        HttpClient httpClient = new HttpClient();
        GetMethod getMethod = new GetMethod(requestUrl);
        httpClient.executeMethod(getMethod);
        return new String(getMethod.getResponseBody());
    }
}
